package com.panshi.service.impl;

import com.panshi.entity.AppEssayT;
import com.panshi.entity.ClassifyT;
import com.panshi.entity.SysEssayCheckT;
import com.panshi.service.ZxClientService;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class ZxClientServiceFallbackFactory implements FallbackFactory<ZxClientService> {
    @Override
    public ZxClientService create(Throwable cause) {
        System.out.println("服务降级 zx  ---- classify");
        return new ZxClientService() {

            @Override
            public Boolean essayCommAdd(int essayId) {
                return false;
            }

            @Override
            public Boolean essayReadAdd(int essayId) {
                return false;
            }

            @Override
            public List<AppEssayT> zxAll() {
                return null;
            }

            @Override
            public AppEssayT zxbyid(Integer id) {
                return new AppEssayT();
            }

            @Override
            public Boolean zxAdd(SysEssayCheckT sysEssayCheckT) {
                return false;
            }

            @Override
            public List<AppEssayT> zxPage(int page, int limit, String type) {
                return new ArrayList<>();
            }

            @Override
            public List<AppEssayT> zxCPage(int cid, int page, int limit, String type) {
                return new ArrayList<>();
            }

            @Override
            public List<ClassifyT> call() {
                return null;
            }

            @Override
            public ClassifyT bycid(Integer id) {
                return new ClassifyT();
            }

            @Override
            public List<SysEssayCheckT> secLikeState(String essayTitle, String status, int page, int limit) {
                return new ArrayList<>();
            }

            @Override
            public List<SysEssayCheckT> secAll() {
                return new ArrayList<>();
            }

            @Override
            public SysEssayCheckT secById(int sysEssId) {
                return new SysEssayCheckT();
            }

            @Override
            public Boolean updPossAdd(int sysEssayId, String describe) {
                return false;
            }

            @Override
            public Boolean updNotAdd(int sysEssayId, String describe) {
                return false;
            }

            @Override
            public boolean essayDel(int essayId, String describe) {
                return false;
            }

            @Override
            public Boolean essayPut(int essayId, String describe) {
                return false;
            }
        };
    }
}
